package com.wmx.jdbc_template_app.easypoi;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.handler.inter.IExcelDataModel;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 用户导入实体类
 *
 * @author wangMaoXiong
 * @version 1.0
 * @date 2024/4/20 15:40
 */
@Data
public class UserImportVO implements Serializable, IExcelDataModel {

    @Excel(name = "姓名")
    private String realName;

    @Excel(name = "性别", replace = {"男_1", "女_2"}, suffix = "生")
    private Integer sex;

    @Excel(name = "出生日期", format = "yyyy-MM-dd")
    private Date birthday;

    @Excel(name = "手机号码")
    private String phone;

    @Excel(name = "固定电话")
    private String tel;

    @Excel(name = "邮箱")
    private String email;

    /**
     * 文件中的图片资源默认会进行存储，然后返回存储的文件地址
     * savePath：导入路径,如果是图片可以填写,默认是upload/className/ IconEntity这个类对应的就是upload/Icon/
     */
    @Excel(name = "头像", type = 2)
    private String avatar;

    @Excel(name = "信息")
    private String errorMsg;

    /**
     * 行号，从0开始
     */
    private Integer rowNum;

    @Override
    public Integer getRowNum() {
        return this.rowNum;
    }

    @Override
    public void setRowNum(Integer i) {
        this.rowNum = i;
    }
}